package com.qianfeng.openapi.managerplateform.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import org.springframework.format.annotation.DateTimeFormat;


import java.util.Date;

/**
 * @author menglili
 */

@JsonInclude(value = JsonInclude.Include.NON_NULL)
public class UserToken {
    private Integer id;
    private Integer cusId;
    private String accessToken;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") // 将 util.Date 转化为 字符进行保存
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date expireTime;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") // 将 util.Date 转化为 字符进行保存---前端没有初始化为字符串  但他传递的参数是text
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date startTime;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getCusId() {
        return cusId;
    }

    public void setCusId(Integer cusId) {
        this.cusId = cusId;
    }

    public String getAccessToken() {
        return accessToken;
    }

    public void setAccessToken(String accessToken) {
        this.accessToken = accessToken;
    }

    public Date getExpireTime() {
        return expireTime;
    }

    public void setExpireTime(Date expireTime) {
        this.expireTime = expireTime;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }
}
